home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2010 July / SAN CD 7-2010 CD-ROM 62.iso / pc / issueMedia / Software / Redshift7Launcher / Redshift7LauncherEN.exe / Disk1 / data1.cab / App_Executables / redshift.vbs < prev    next >
Encoding:
Text File  |  2009-04-14  |  2.5 KB  |  134 lines

  1.  
  2. const pi = 3.1415926535897932384626433832795
  3. const SW_HIDE             =0
  4. const SW_SHOWNORMAL       =1
  5. const SW_NORMAL           =1
  6. const SW_SHOWMINIMIZED    =2
  7. const SW_SHOWMAXIMIZED    =3
  8. const SW_MAXIMIZE         =3
  9. const SW_SHOWNOACTIVATE   =4
  10. const SW_SHOW             =5
  11. const SW_MINIMIZE         =6
  12. const SW_SHOWMINNOACTIVE  =7
  13. const SW_SHOWNA           =8
  14. const SW_RESTORE          =9
  15. const SW_SHOWDEFAULT      =10
  16. const SW_FORCEMINIMIZE    =11
  17. const SW_MAX              =11
  18.  
  19.  
  20.  
  21. const ID_LM_HELIOCENTRIC  = 33193
  22. const kModePopupButton    = 530 
  23. const WM_COMMAND          = &H111
  24.  
  25. public theTime
  26. public Direction
  27. public Location
  28. public Filters
  29.  
  30.  
  31.  
  32. sub SetHelioCentricView(ID)
  33.    on error resume next
  34.    set ws       = getwindow(ID)
  35.    set camera   = ws.camera
  36.    set locpanel =  camera.Location
  37.    locpanel.Sendmessage WM_COMMAND , kModePopupButton ,ID_LM_HELIOCENTRIC
  38. end sub
  39.  
  40.  
  41. sub UpdateWindows
  42.   on error resume next 
  43.   for i = 1 to getWindowCount()
  44.     set w = getWindow(i)
  45.     w.UpdateSky()
  46.   next
  47.   DoEvents
  48. end sub
  49.  
  50. sub CloseAllTimers
  51.     on Error resume next
  52.     for i = 1 to getWindowCount()
  53.       set wnd = getWindow(i)
  54.       Set Camera = wnd.camera
  55.       Set theTime = camera.time
  56.       Set Direction = camera.Direction
  57.       Set Location = camera.Location
  58.       theTime.Stop
  59.       Location.StopDistance
  60.       Location.StopLongitude
  61.       Location.StopLattitude
  62.       Direction.ZoomStop
  63.       Direction.DekStop
  64.       Direction.RaStop
  65.       Direction.SlopeStop
  66.     next
  67. end sub
  68.  
  69. sub CheckTime
  70.  dim w
  71.  dim camera
  72.  
  73.   if(IsObject(theTime)) then
  74.      
  75.   else
  76.     set w = getWindow(activeWindow)
  77.     Set camera = w.camera
  78.     Set theTime =camera.Time
  79.   end If 
  80.  
  81. end sub
  82.  
  83. sub CheckDirection
  84. dim wnd
  85. dim camera
  86.  
  87.   if(IsObject(Direction)) then
  88.  
  89.   else
  90.     set wnd = getWindow(activeWindow)
  91.     Set camera = wnd.camera
  92.     set Direction =Camera.Direction
  93.   end if  
  94. end sub
  95.  
  96.  
  97. sub CheckLocation
  98. dim wnd
  99. dim camera
  100.  
  101.   if(IsObject(Location)) then
  102.  
  103.   else
  104.     set wnd = getWindow(activeWindow)
  105.     Set camera = wnd.camera
  106.     set Location =Camera.Location
  107.   end if  
  108. end sub
  109.  
  110. sub CheckFilters
  111. dim wnd
  112. dim camera
  113.   if(IsObject(Filters)) then
  114.   else
  115.     set wnd = getWindow(activeWindow)
  116.     Set Filters = wnd.Filters
  117.   end if  
  118. end sub
  119.  
  120.  
  121. sub MainwndMsg ( command,wparam,lparam)
  122.  set mainwnd = MainWindow()
  123.  mainwnd.SendMessage clng(command), clng(wparam), clng(lparam)
  124.  mainwnd=null
  125. end sub
  126.  
  127. sub SafeCloseGTour
  128.     WaitForMedia
  129.     CloseTextWindows
  130. end sub
  131.  
  132.  
  133. 'msgbox "loaded!!!"
  134.